1. Field of the Invention
The present invention relates to a voltage regulator capable of preventing a large current from flowing when a battery is connected with reverse polarity by mistake.
2. Description of the Related Art
As a conventional voltage regulator, a circuit as illustrated in FIG. 4 is known (see, for example, Japanese Patent No. 2706720 (FIG. 1)).
A battery 110 has a positive terminal connected to a VDD terminal 121 and a negative terminal connected to a VSS terminal (GND) 123. A load 111 is connected to a VOUT terminal 122.
A reference voltage circuit 101 outputs a constant voltage (reference voltage), which is applied to an inverting input terminal of an error amplifier 102. A voltage at the VOUT terminal 122 is divided by resistors 104 and 105, and the divided voltage is applied to a non-inverting input terminal of the error amplifier 102. An output transistor 103 has a source and a substrate which are connected to the VDD terminal 121, a drain connected to the VOUT terminal 122, and a gate connected to an output of the error amplifier 102. The resistance value of the output transistor 103 is controlled by the output of the error amplifier 102. That is, when the voltage obtained by dividing the voltage (output voltage) at the VOUT terminal by the resistors 104 and 105 is lower than the output voltage of the reference voltage circuit 101, the output of the error amplifier 102 decreases so as to strongly bias the output transistor 103 to decrease the resistance value. Then, the voltage at the VOUT terminal 122 increases. On the other hand, when the voltage divided by the resistors 104 and 105 is higher than the reference voltage, the output transistor 103 is weakly biased to increase the resistance value so that the voltage at the VOUT terminal 122 decreases. In this way, the voltage regulator is controlled so that a constant voltage is output to the VOUT terminal 122.
In general, the circuit of the error amplifier 102 is typified by a differential amplifier circuit as illustrated in FIG. 5. A positive input terminal 721 and a negative input terminal 722 of the error amplifier 102 are connected to gates of N-channel transistors 701 and 702, respectively. The N-channel transistors 701 and 702 have sources connected to a constant current source 705 in common. The N-channel transistor 701 has a drain connected to a gate and a drain of a P-channel transistor 703 and to a gate of a P-channel transistor 704. The N-channel transistor 702 has a drain connected to a drain of the P-channel transistor 704. An EOUT terminal 723 corresponds to an output terminal of the error amplifier 102.
The N-channel transistors 701 and 702 have parasitic diodes 701D and 702D, respectively, whose anodes are connected to VSS and cathodes are connected to the drains. The P-channel transistors 703 and 704 have parasitic diodes 703D and 704D, respectively, whose anodes are connected to the drains and cathodes are connected to VDD.
In the conventional voltage regulator, when the battery 110 is connected to the VDD terminal and the VSS terminal of the voltage regulator with reverse polarity, the parasitic diodes 701D and 703D and the parasitic diodes 702D and 704D are connected in the forward direction, respectively, and then a large current flows through the path.
Further, a large current flows through the voltage regulator via the load 111 or a protective element (not shown) provided between the VOUT terminal 122 and the VSS terminal and via a parasitic diode 103D of the output transistor 103.